package com.recharge.api.controller;

import com.recharge.api.dto.request.CommissionRequest;
import com.recharge.api.service.CommissionService;
import com.recharge.api.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/api/commission")
public class CommissionController {

    @Autowired
    private CommissionService commissionService;
    @RequestMapping("/getCommissionList")
    public Result getCommissionList() {
        return commissionService.getCommissionList();
    }

    @PostMapping("/updateCommission")
    public Result updateCommission(@RequestBody CommissionRequest commissionRequest) {

        return commissionService.updateCommission(commissionRequest);
    }

}
